﻿<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="utf-8" />
    <link href="../lib/layui/css/layui.min.css" rel="stylesheet" />
    <style>
        .layui-form-select dl {
            max-height: 200px;
        }
    </style>
    <script type="text/javascript" src="../lib/Base64/base64.min.js"></script>
    <script type="text/javascript" src="../linq.js/linq.js"></script>
    <script src="../lib/layui/layui.js"></script>
</head>
<body>
    <div class="layui-fluid">
        <form class="layui-form" lay-filter="userDetailForm">
            <input type="hidden" id="id" name="id" />
            <div class="layui-form-item" style="margin-top:10px;">
                <label class="layui-form-label">用户名</label>
                <div class="layui-input-block">
                    <input type="text" name="name" id="name" lay-verify="required" class="layui-input" readonly />
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">姓名</label>
                <div class="layui-input-block">
                    <input type="text" name="xiangshimingcheng" id="xiangshimingcheng" lay-verify="required" class="layui-input" readonly />
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">所属部门</label>
                <div class="layui-input-block">
                    <input type="text" name="dname" id="dname" lay-verify="required" class="layui-input" readonly />
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">所属组织</label>
                <div class="layui-input-block">
                    <input type="text" name="gname" id="gname" lay-verify="required" class="layui-input" readonly />
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">所属角色</label>
                <div class="layui-input-block">
                    <input type="text" name="rname" id="rname" lay-verify="required" class="layui-input" readonly />
                </div>
            </div>
        </form>

    </div>
    <script type="text/javascript">
        function getrequest() {
            var url = location.search; //获取url中"?"符后的字串
            var theRequest = new Object();
            if (url.indexOf("?") != -1) {
                var str = url.substr(1);
                strs = str.split("&");
                for (var i = 0; i < strs.length; i++) {
                    theRequest[strs[i].split("=")[0]] = unescape(strs[i].split("=")[1]);
                }
            }
            return theRequest;
        };

        layui.use(['form'], function () {
            var form = layui.form;
            var $ = layui.$;
            $(function () {
                var item = JSON.parse(window.decodeURIComponent(atob(getrequest().iteminfo)));
                form.val('userDetailForm', {
                    "id": item.id,
                    "name": item.name,
                    "xiangshimingcheng": item.xianshimingcheng,
                    "dname": item.dname,
                    "gname": item.gname,
                    "rname": item.rname
                });
            })
        })
    </script>
</body>
</html>